<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>
	<body>
		<script>
			//写一个正则表达式,用于验证字符串内容为"abc"
			const regex = /abc/;
			let string = "abcd";
			//验证指定的字符串是否满足正则模式,满足返回true,不满足返回false
			regex.test(string);
			console.log(regex.test(string)); //返回的是true
		</script>
	</body>
</html>
